package com.dba.example.guice.dao;

import java.util.List;

import com.dba.example.entities.Company;
import com.dba.example.guice.beans.Page;
import com.dba.example.guice.beans.PageRequest;

public interface CompanyDao {

	/**
	 * List all companies.
	 * 
	 * @return
	 */
	List<Company> list();
	
	/**
	 * Get a paged list of the companies.
	 * 
	 * @param request
	 * @return
	 */
	Page<Company> page(PageRequest request, String search);
	
	/**
	 * Get an specific company.
	 * 
	 * @param id
	 * @return
	 */
	Company get(Integer id);
	
	/**
	 * Create/Update a company.
	 * 
	 * @param company
	 * @return
	 */
	Company save(Company company);
	
	/**
	 * Delete a company.
	 * 
	 * @param id
	 * @return
	 */
	boolean delete(Integer id);
	
}
